import Taro from "@tarojs/taro"

export const Toast = {
  success: (tips: string) => Taro.showToast({
    icon: "success",
    title: tips,
    duration: 1500,
    mask: true
  }),
  error: (tips: string) => Taro.showToast({
    icon: "none",
    title: tips,
    duration: 1500,
    mask: true
  }),
  showLoading: (tips: string = "加载中") => Taro.showLoading({
    title: tips,
    mask: true
  }),
  hideLoading: () => Taro.hideLoading(),
}
